package com.yuyou.tas.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.yuyou.tas.service.api.admin.dto.DtoAuthOrgan;
import com.yuyou.tas.service.api.admin.entity.AuthOrganizationExt;
import com.yuyou.tas.util.bean.Pagination;

@Mapper
public interface AuthOrganizationExtMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AuthOrganizationExt record);

    AuthOrganizationExt selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AuthOrganizationExt record);

    int findOrgPageCount(Pagination<DtoAuthOrgan> p);

    List<DtoAuthOrgan> findOrgPageList(Pagination<DtoAuthOrgan> p);
    
    /**
     * 根据用户账号找出可用的机构
     * @param account
     * @return
     */
    List<AuthOrganizationExt> findActiveOrganByAcc(String account);
    
    /**
     * 根据用户账号找出机构
     * @param account
     * @return
     */
    List<AuthOrganizationExt> findOrganByAcc(String account);
}